<!-- #include file="aFun_CC_wyl.asp" -->

<%
call GuestTotal()
call MemberTotal()
call ArticleTotal()
call OlineUserState()
%>

<script language="JavaScript">
function showsubmenu(sid)
{
    whichEl = eval("submenu" + sid);
    if (whichEl.style.display == "none")
    {
         eval("submenu" + sid + ".style.display=\"\";");
    }
    else
    {
         eval("submenu" + sid + ".style.display=\"none\";");
    }
}

function loadThreadFollow(ino){
      var targetImg =eval("followImg" + ino);
      var targetDiv =eval("follow" + ino);
      if (targetDiv.style.display!='block'){
            targetDiv.style.display="block";
            targetImg.src="images/minus.gif";
      }else{
            targetDiv.style.display="none";
            targetImg.src="images/plus.gif";
      }
}
</script>
<%
sub GuestTotal()
        dim qqq  
        qqq=Application("tslt_vnumber")
%>
            <br>
            <CENTER>
            <font size=2>
            ӭ<%if session("tslt_username")<>"" then%><font color=#000070><b> <%=session("tslt_username")%></b></font> <%end if%><img border="0" src="images/tushan2.gif" width="100" height="50">ǵڣ<b><%=qqq%></b> λ<br>
<%
end sub

sub MemberTotal()
       dim  strSQL,RS
       strSQL = "SELECT Count(id) as total  FROM ts_userinfo"
       Set RS = conn.Execute(strSQL )
             Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_bottom(0))</SCRIPT>" &RS("total")& "<SCRIPT language=Javascript>passwords(promptInfo_bottom(1))</SCRIPT>"
       RS.close
       set RS = Nothing
end sub

sub ArticleTotal()
      dim SubjectTotalCount
      SubjectTotalCount = 0
      set SubjectRs = server.CreateObject("adodb.recordset")
      SubjectSql = "select id FROM article"
      SubjectRs.open SubjectSql,conn,1,1
            if Not(SubjectRs.Eof and SubjectRs.bof) then
                    SubjectTotalCount = SubjectRs.Recordcount
             End if
       SubjectRs.Close
       set SubjectRs = Nothing
       Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_bottom(2))</SCRIPT>" &SubjectTotalCount& "<SCRIPT language=Javascript>passwords(promptInfo_bottom(3))</SCRIPT>"
       dim ReplyTotalCount
       ReplyTotalCount = 0
       set replyrs = server.CreateObject("adodb.recordset")
       replysql = "select id FROM reply"
       replyrs.open replysql,conn,1,1
             if Not(replyrs.Eof and replyrs.bof) then
	    ReplyTotalCount =replyrs.recordCount
              End if
       replyrs.Close
       set replyrs = Nothing
       Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_bottom(4))</SCRIPT>" &ReplyTotalCount& "<SCRIPT language=Javascript>passwords(promptInfo_bottom(3))</SCRIPT>"
end sub

sub OlineUserState()
      dim rs,onlinecount,onlinename
      set rs = server.CreateObject("adodb.recordset")
      rs.open "select * from ym_online order By onlinetime desc",conn,1,1          
               if Not rs.Eof then
                 onlinecount = rs.recordCount
            End if
      rs.close
      set rs = Nothing
       dim configrs,useronlinecount,useronlinecounttime
       set configrs = server.CreateObject("adodb.recordset")
       configrs.open "select * from option1 order By id desc",conn,1,1
              if Not configrs.Eof then
                     useronlinecount = configrs("useronlinecount")
                     useronlinecounttime = configrs("useronlinecounttime")
                     if useronlinecount < onlinecount then
                           Conn.ExeCute("update option1 set useronlinecount="& onlinecount &",useronlinecounttime='"& Now() &"'")
                           useronlinecount = onlinecount
                     End if
              End if
       configrs.close
       set configrs = Nothing
%>
       <CENTER>
       <img loaded="no" src="images/plus.gif" id="followImg0" style="cursor:hand;" onclick="loadThreadFollow(0)">
       <font size=2>
       û - ̳ǰ <font color=green><b><%=onlinecount%></b></font>  | ߼¼
       <%=useronlinecounttime%>  <b><%=useronlinecount%></b> λûͬʱ
       </font>
       <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
                <tr>
                       <td id="follow0" style="DISPLAY: none">
                                <iframe src="bottom_inc.asp" frameborder="1" scrolling="yes" width="100%" HEIGHT="150"></iframe>
                       </td>
               </tr>
       </table>
       <br>
       </CENTER>
<%
end sub
%>
